package com.netease.pris.activity.view;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import com.netease.image.video.ActivityMovieView;
import com.netease.imageex.ImageViewScanActivity;
import com.netease.pris.atom.u;
import com.netease.pris.atom.z;
import com.netease.pris.d.c;
import com.netease.pris.protocol.d;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

class bb extends WebViewClient
{
  bb(PrisArticleView paramPrisArticleView)
  {
  }

  public void onPageFinished(WebView paramWebView, String paramString)
  {
    super.onPageFinished(paramWebView, paramString);
    if ((PrisArticleView.h(this.a) == null) || (PrisArticleView.i(this.a) < 2))
      PrisArticleView.j(this.a);
    while (true)
    {
      return;
      if (paramString.equals("about:blank"))
      {
        PrisArticleView.a(this.a, 0);
        PrisArticleView.a(this.a, PrisArticleView.c(this.a), true, true);
        continue;
      }
      if (PrisArticleView.c(this.a) != null)
      {
        this.a.h.a();
        List localList = PrisArticleView.c(this.a).c();
        if (localList != null)
        {
          Iterator localIterator = localList.iterator();
          int i = 0;
          while (localIterator.hasNext())
          {
            String str = (String)localIterator.next();
            ag localag = this.a.h;
            i++;
            localag.a(str, i);
          }
        }
      }
      if (!PrisArticleView.k(this.a))
        continue;
      PrisArticleView.l(this.a).setVisibility(8);
      PrisArticleView.m(this.a).setVisibility(8);
    }
  }

  public boolean shouldOverrideUrlLoading(WebView paramWebView, String paramString)
  {
    int i = 0;
    if (paramString.startsWith("web:getvideoclick;"))
    {
      ActivityMovieView.a(PrisArticleView.a(this.a), paramString.substring("web:getvideoclick;".length()));
      c.a(PrisArticleView.b(this.a), 739);
    }
    int k;
    u localu;
    do
    {
      do
      {
        int j;
        do
        {
          do
            while (true)
            {
              return true;
              if (!paramString.startsWith("web:gethtmlclick;"))
                break;
              try
              {
                Intent localIntent = new Intent("android.intent.action.VIEW", Uri.parse(paramString.substring("web:gethtmlclick;".length())));
                PrisArticleView.a(this.a).startActivity(localIntent);
              }
              catch (Exception localException)
              {
                localException.printStackTrace();
              }
            }
          while (!paramString.startsWith("web:getimageclick"));
          j = paramString.lastIndexOf("=");
        }
        while (j < 0);
        k = Integer.parseInt(paramString.substring(j + 1));
      }
      while ((PrisArticleView.c(this.a) == null) || (PrisArticleView.c(this.a).h.size() <= 0));
      localu = (u)PrisArticleView.c(this.a).h.getFirst();
    }
    while ((localu == null) || (!localu.K()));
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    z[] arrayOfz = localu.aA();
    for (int m = 0; m < arrayOfz.length; m++)
    {
      if (arrayOfz[m].u() == k)
        i = m;
      String str = arrayOfz[m].g();
      if (localArrayList1.contains(str))
        continue;
      localArrayList1.add(str);
      localArrayList2.add(arrayOfz[m].v());
    }
    if (i >= localArrayList2.size());
    for (int n = -1 + localArrayList2.size(); ; n = i)
    {
      ImageViewScanActivity.a(PrisArticleView.a(this.a), PrisArticleView.d(this.a), PrisArticleView.e(this.a), n, PrisArticleView.f(this.a), PrisArticleView.g(this.a));
      break;
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.view.bb
 * JD-Core Version:    0.6.0
 */